package com.foreknow.dao.impl;

import com.foreknow.bean.Food;
import com.foreknow.dao.FoodDao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;


public class FoodDaoImpl extends BaseDao implements FoodDao {
	
	private Connection con = null;
	private PreparedStatement pst = null;
	private ResultSet rs = null;

	@Override
	public List<Food> listFoodByBusinessId(Integer businessId) {
		List<Food> list = new ArrayList<>();
		String sql = "select * from food where businessId=?";
		return list;
	}
	
	@Override
	public int saveFood(Food food) {
		int result = 0;
		return result;
	}
	
	@Override
	public Food getFoodById(Integer foodId) {
		Food food = null;
		String sql = "select * from food where foodId=?";
		return food;
	}
	
	@Override
	public int updateFood(Food food) {
		int result = 0;
		String sql = "update food set foodName=?,foodExplain=?,foodPrice=? where foodId=?";
		return result;
	}
	
	@Override
	public int removeFood(Integer foodId) {
		int result = 0;
		String sql = "delete from food where foodId=?";
		return result;
	}
}
